const scssVariables = require('./src/styles/variables.scss.js')
module.exports = {
  css: {
    loaderOptions: {
      scss: {
      // 注意：在 sass-loader v8 中，这个选项名是 "prependData"
      // additionalData: `@import "~@/styles/imports.scss";`
        additionalData: Object.keys(scssVariables)
          .map(k => `$${k.replace('_', '-')}: ${scssVariables[k]};`)
          .join('\n')
      }
    }
  }
}
